#ifndef CONFIG_MANAGE_H
#define CONFIG_MANAGE_H

#include <iostream>
#include <string>
#include <thread>
#include <vector>


typedef struct
{
    std::string task_name;
    int task_period;
    std::string task_topic;
}CONFIG_TASK;

typedef struct
{
    std::string serial_device;
    int baud;
    int data_bits;
    int stop_bits;
}CONFIG_SERIAL_HARDWARE;

typedef struct
{
    CONFIG_TASK config_task;
    CONFIG_SERIAL_HARDWARE config_serial_hardware;
}CONFIG_DTU;

typedef struct
{
    CONFIG_TASK config_task;
    CONFIG_SERIAL_HARDWARE config_serial_hardware;
}CONFIG_GNSS;

typedef struct
{
    CONFIG_TASK config_task;
    CONFIG_SERIAL_HARDWARE config_serial_hardware;
}CONFIG_SINGCHIP;

typedef struct
{
    CONFIG_TASK config_task;
    CONFIG_SERIAL_HARDWARE config_serial_hardware;
}CONFIG_IMU;

typedef struct
{
    CONFIG_SINGCHIP config_singchip;
    CONFIG_DTU config_dtu;
    CONFIG_GNSS config_gnss;
    CONFIG_IMU config_imu;
}CONFIG_DRIVER;

typedef struct
{
    bool config_imu_en;
    bool config_ultrasonic_en;
    bool config_gnss_en;
    bool config_dtu_en;
    bool config_bluetooth_en;
    bool config_singlechip_en;
    bool config_monochrome_camera_en;
    bool config_rgb_camera_en;
}CONFIG_DRIVER_EN;

typedef struct
{
    CONFIG_DRIVER_EN config_driver_en; // 对各个设备的使能设置
    CONFIG_DRIVER    config_driver;    // 对各个设备及对应的线程的设置
}CONFIG_SET;

class C_configManage
{
private:
    /* data */
    void readFileJson(const std::string filename);
public:
    C_configManage();
    ~C_configManage();
///private:
    CONFIG_SET C_config_set;
///public:
    int32_t getAllConfig(const std::string filePath); 
};




#endif

